﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace Chromatics.Pages
{
    public partial class LevelLockPage : PhoneApplicationPage
    {
        private static Difficulty difficulty;
        private static int count;

        public static void setCurrent(int Count, Difficulty Diff)
        {
            difficulty = Diff;
            count = Count;
        }

        public LevelLockPage()
        {
            InitializeComponent();
            this.CurrentStars.Text = DataLoader.Instance.AvaliableStars().ToString();
            this.NeededtStars.Text = DataLoader.Instance.NeededStars(count, difficulty).ToString();
        }

        private void OkBtn_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            this.NavigationService.GoBack();
            SoundPlayer.PlayDing();
        }

        private void PhoneApplicationPage_BackKeyPress_1(object sender, System.ComponentModel.CancelEventArgs e)
        {
            SoundPlayer.PlayDing();
        }
    }
}